<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page import="javax.jdo.Query" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="java.util.List" %>
<%@ page import="shared.PMF" %>
<%@ page import="activity.*" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>上架表單</title>
</head>
<body>
<p></p>
<form id="form1" name="form1" method="post" action=/activity/addSupply>
  <p><strong>詳細點數上架資料(for提供)</strong></p>
  <p>提供點數(請填寫您想要提供的點數資料)：</p>
  <p>提供商家名稱： <select name="actShop_s">
<%
		PersistenceManager pm = PMF.get().getPersistenceManager();
		Query query = pm.newQuery(Activity.class);
		List<Activity> results = (List<Activity>) query.execute();
        for (Activity act : results) {      	
%>
	  <option value=<%=act.getActShop() %>><%=act.getActShop() %></option>				
<% 
        }	
       %>
  </select></p>
  <p>提供活動名稱：  <select name="actName_s">
<%
        for (Activity act : results) {
			//if(act.getActShop().equals(actShop_s)){      	
%>
				<option value=<%=act.getActName() %>><%=act.getActName() %></option>				
<% 
			//}//if	
        }	
 %>
  </select></p>
  提供點數數量：
  <input type="text" name="actPoint_s"/>
  <p>欲蒐集期限: <input type="text" name="actEnd_s"/>
  (輸入形式YYYY/MM/DD)</p>
  	<p>提供描述：
  <input type="text" name="actContent_s"/>
  </p>
  	<p>
  	  <input type="submit" value="我要上傳" />
  </p>
</form>


</body>
</html>